﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="_Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <script type="text/javascript" src="Scripts/jquery-1.4.1.js"></script>

</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <script type="text/javascript">
        $(document).ready(function () {
            //            $('h1:first').fadeIn('slow');
            //            $('h1:first').fadeOut('slow');
            $('h1').each(function (index) {
                this.innerHTML = "haitranba";
                $('h1').get(0).innerHTML = "1234";
            });
        });
    </script>
    <h1>
        Welcome to ASP.NET!
    </h1>
    <p>
        To learn more about ASP.NET visit <a href="http://www.asp.net" title="ASP.NET Website">www.asp.net</a>.
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
    </p>
<p>
    </p>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="SupplierID" DataSourceID="SqlDataSource1" AllowPaging="True">
            <Columns>
                <asp:BoundField DataField="SupplierID" HeaderText="SupplierID" 
                    InsertVisible="False" ReadOnly="True" SortExpression="SupplierID" />
                <asp:BoundField DataField="CompanyName" HeaderText="CompanyName" 
                    SortExpression="CompanyName" />
                <asp:BoundField DataField="ContactName" HeaderText="ContactName" 
                    SortExpression="ContactName" />
                <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
                <asp:BoundField DataField="Phone" HeaderText="Phone" SortExpression="Phone" />
            </Columns>
        </asp:GridView>
        <br />
        <br />
    </ContentTemplate>
</asp:UpdatePanel>
<p>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:NORTHWINDConnectionString %>" 
            
            SelectCommand="SELECT [SupplierID], [CompanyName], [ContactName], [City], [Phone] FROM [Suppliers]" 
            InsertCommand="INSERT INTO Suppliers(CompanyName, ContactName) VALUES (@company, @contactname)">
            <InsertParameters>
                <asp:ControlParameter ControlID="TextBox1" Name="company" PropertyName="Text" />
                <asp:ControlParameter ControlID="TextBox2" Name="contactname" 
                    PropertyName="Text" />
            </InsertParameters>
        </asp:SqlDataSource>
    </p>
    <div style="width: 448px; height: 155px">
        Company<br /><asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <br />
        Contact name<br /><asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
        <br />
        <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
    </div>
    
    <p>
        You can also find <a href="http://go.microsoft.com/fwlink/?LinkID=152368&amp;clcid=0x409"
            title="MSDN ASP.NET Docs">documentation on ASP.NET at MSDN</a>.
    </p>
    <p>
    <h1>Day la H1 tag</h1>
    </p>
</asp:Content>
